<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!-- th:fragment 定义需要引入的代码块，该div包含的内容即为引用的公共内容 -->

<!-- html头部菜单 -->
<div th:fragment="headPage">
    <nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow" >
    <div style="float: left; width:90%;">
        <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
            <i class="fa fa-bars"></i>
        </button>
        <form class="d-none d-sm-inline-block form-inline mr-auto ml-md-3 my-2 my-md-0 mw-100 navbar-search">
            <div class="input-group">
                <input type="text" class="form-control bg-light border-0 small" placeholder="输入搜索内容" aria-label="Search" aria-describedby="basic-addon2">
                <div class="input-group-append">
                    <button class="btn btn-primary" type="button">
                        <i class="fas fa-search fa-sm"></i>
                    </button>
                </div>
            </div>
        </form>
    </div>
    <ul class="navbar-nav ml-auto">
        <!-- Nav Item - User Information -->
        <li class="nav-item dropdown no-arrow">
            <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <span class="mr-2 d-none d-lg-inline text-gray-600 small" th:text="${session.userId}"></span>
                <img class="img-profile rounded-circle" src="../admin/img/head_pic.jpg">
            </a>
            <!-- Dropdown - User Information -->
            <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
                <a class="dropdown-item" th:href="@{'./browseUserInfo?userId='+${session.userId}}">
                    <i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
                    个人信息
                </a>
                <div class="dropdown-divider"></div>
                <a class="dropdown-item" href="./userLoginView" >
                    <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
                    退出
                </a>
            </div>
        </li>
    </ul>
    </nav>
</div>

</html>